package cn.longwingstech.intelligence.bibackend.service;

import cn.longwingstech.intelligence.bibackend.model.dto.user.UserQueryRequest;
import cn.longwingstech.intelligence.bibackend.model.vo.user.LoginUserVO;
import cn.longwingstech.intelligence.bibackend.model.vo.user.UserVO;
import com.mybatisflex.core.service.IService;
import cn.longwingstech.intelligence.bibackend.model.entity.User;
import jakarta.servlet.http.HttpServletRequest;

/**
 * 用户 服务层。
 *
 * @author 君墨
 */
public interface UserService extends IService<User> {

    /**
     * 用户注册
     * @param userAccount
     * @param userPassword
     * @param checkPassword
     * @return
     */
    Long userRegister(String userAccount, String userPassword, String checkPassword);

    /**
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @return
     */
    LoginUserVO userLogin(String userAccount, String userPassword);

    /**
     * 用户注销
     * @return
     */
    Boolean userLogout();

    /**
     * 获取当前登录用户
     * @return
     */
    User getLoginUser();

    /**
     * 获取当前用户 (脱敏)
     * @param user
     * @return
     */
    LoginUserVO getLoginUserVO(User user);

    /**
     * 获取用户 (脱敏)
     * @param user
     * @return
     */
    UserVO getUserVO(User user);
}
